package com.veo.service;

import com.veo.entity.CommonResult;
import com.veo.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Service
//指定接口要调用的微服务实例的名称
@FeignClient(value = "cloud-payment-service")
public interface PaymentFeignService {

    @GetMapping("/payment/get/{id}")
    CommonResult<Payment> getById(@PathVariable("id")Long id);

    @GetMapping("/payment/feign/timeout")
    public String timeout();
}
